package com.hunktimes.wholesale.vm

import androidx.lifecycle.MutableLiveData
import com.hunktimes.wholesale.base.BaseViewModel
import com.hunktimes.wholesale.extension.launch
import com.hunktimes.wholesale.net.WholeSaleRepository
import com.hunktimes.wholesale.net.model.MemberInfo
import com.hunktimes.wholesale.net.model.RecAddress

/**
 * Author: Delete
 * Date: 2020/8/14 11:37
 * Description:
 *
 */
class MemberInfoVM:BaseViewModel() {

    val updateMemberInfoResult = MutableLiveData<String>()
    fun updateMemberInfo() {
        launch({
            val memberInfo = MemberInfo("https://xxx.avatrar.png","Jax",1)
            val resp = WholeSaleRepository.updateMemberInfo(memberInfo)
            val update = resp.data
            update?.let {
                updateMemberInfoResult.value = it
            }
        })
    }
}